import { newRequest } from '@/utils/newRequest'

export function getTechRoutePageList(params) {
    return newRequest({
        url: '/api/BasicsData/GetTechRoutePageList',
        method: 'get',
        params: {
            ...params
        }
    })
}

export function insertTechRoute(data) {
    return newRequest({
        url: '/api/basicsData/InsertTechRoute',
        method: 'post',
        data: {
            ...data
        }
    })
}
export function updateTechRoute(data) {
    return newRequest({
        url: '/api/basicsData/UpdateTechRoute',
        method: 'post',
        data: {
            ...data
        }
    })
}
export function startOrStopTechRoute(data) {
    return newRequest({
        url: '/api/basicsData/StartOrStopTechRoute',
        method: 'post',
        data: {
            ...data
        }
    })
}
//删除
export function removeTechRoute(data) {
    return newRequest({
        url: '/api/basicsData/RemoveTechRoute',
        method: 'post',
        data: {
            ...data
        }
    })
}
// 工艺路线-配置产品工艺路线
export function setTechRouteByProduct(data) {
    return newRequest({
        url: '/api/basicsData/SetTechRouteByProduct',
        method: 'post',
        data: {
            ...data
        }
    })
}
// 工艺路线-配置工序
export function setTechRouteByTech(data) {
    return newRequest({
        url: '/api/basicsData/SetTechRouteByTech',
        method: 'post',
        data: {
            ...data
        }
    })
}
// 工艺路线-取消工序
export function removeTechRouteByTech(data) {
    return newRequest({
        url: '/api/basicsData/RemoveTechRouteByTech',
        method: 'post',
        data: {
            ...data
        }
    })
}

// 工艺路线-产品详情
export function getTechRouteProductList(params) {
    return newRequest({
        url: '/api/BasicsData/GetTechRouteProductList',
        method: 'get',
        params: {
            ...params
        }
    })
}
// 工艺路线-工序详情
export function getTechRouteTechList(params) {
    return newRequest({
        url: '/api/BasicsData/GetTechRouteTechList',
        method: 'get',
        params: {
            ...params
        }
    })
}
//查询工艺日志
export function getTechRouteLog(params) {
    return newRequest({
        url: '/api/system/GetUseLogList',
        method: 'get',
        params: {
            ...params
        }
    })
}
//查询产品
export function getProductListByKeyName(params) {
    return newRequest({
        url: '/api/BasicsData/GetProductListByKeyName',
        method: 'get',
        params: {
            ...params
        }
    })
}